import request from "@/utils/request";
// 上传歌曲
export function upload(formData) {

  return request({
    url: "/upload",
    method: "post",
    data: formData,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded"
    }
  });
}
//上传歌手海报
export function uploadSingerImg(formData){
  return request({
    url:"/upload/singer",
    method:"post",
    data:formData,
    headers:{
      "Content-Type": "application/x-www-form-urlencoded"
    }
  });
}
//从曲库中删除歌曲
export function deleteFromSongsLib(data){
  return request({
    url:"/song/delete",
    method:"delete",
    data:data
  });
}
//从曲库中批量删除歌曲
export function deleteBatchFromSongLib(data){
  return request({
    url:"song/deleteBatch",
    method:"delete",
    data:data
  });
}
//更新
export function updateSongInfo(formData){
  return request({
    url:"song/update",
    method:"put",
    data: formData,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded"
    }
  })
}
//上传头像
export function uploadAvatar(formData){
  return request({
    url:"upload/headerImg",
    method:"post",
    data:formData,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded"
    },
  })
}